<?php
// +----------------------------------------------------------------------
// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2018 http://www.thinkcmf.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: 老猫 <thinkcmf@126.com>
// +----------------------------------------------------------------------
namespace app\portal\controller;
use plugins\sy_guestbook\model\PluginSyGuestbookModel;
use cmf\controller\HomeBaseController;

class IndexController extends HomeBaseController
{
    public function index()
    {
        $where['isread'] = 1;
        $order ="update_time desc";
        $GuestbookModel = new PluginSyGuestbookModel();
        $booklist = $GuestbookModel->where($where)->order($order)->select();
        $booklist = $booklist->toArray();
        $this -> assign("booklist", $booklist);
        return $this->fetch(':index');
    }
}
